<template>
  <div class="bg-white mr-0 overflow-hidden">
    <BasicTree treeWrapperClassName="h-[calc(100%-35px)] overflow-auto" :clickRowToExpand="false" :treeData="treeData"
      @select="handleSelect" />
  </div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';

import { BasicTree, TreeItem } from '/@/components/Tree';

export default defineComponent({
  name: 'TypeTree',
  components: { BasicTree },

  emits: ['select'],
  setup(_, { emit }) {

    const treeData = ref<TreeItem[]>([
      { key: 1, value: 1, title: '超级管理员' },
      { key: 2, value: 2, title: '分级管理员' },
      { key: 3, value: 3, title: '部门管理员' },
    ]);


    function handleSelect(keys: string, e) {
      //console.log('选中管理员类型：',keys[0]);
      emit('select', keys[0]);
     
    }

    return { treeData, handleSelect };
  },
});
</script>
